function interview(callback) {
    setTimeout(() =>{
        if(Math.random()<0.8) {
            callback()
        }else{
            throw new Error('fail')
        }
    },500)
}

interview(function() {
    console.log('smile');
})